/*
	File: C:/works/3d/games/mgt/panzer_2010/data/scripts/water_pond.nut
	Author: Astrofra
*/
		Include("data/scripts/game_item.nut")

/*!
	@short	RadioactiveWater
	@author	Astrofra
*/
class	RadioactiveWater	extends	GameItem
{

	drain_timer		=	0.0

	/*!
		@short	OnUpdate
		Called during the scene update, each frame.
	*/
	function	OnUpdate(item)
	{
		base.OnUpdate(item)
	}

	function	PlayerIsInsideItem(item)
	{
		if ((g_clock - drain_timer) > SecToTick(Sec(1.5)))
		{
			drain_timer = g_clock
			tank_script.TakeDamage()
		}
	}

	/*!
		@short	OnSetup
		Called when the item is about to be setup.
	*/
	function	OnSetup(item)
	{
		base.OnSetup(item)
		drain_timer = g_clock
	}
}
